package com.xiaoh.dormitoryrepairreportbackend.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 通知表
 */
@TableName(value = "notification")
@Data
@Schema(description = "通知表")
public class Notification implements Serializable {

    /**
     * 通知ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "通知ID")
    private Long id;

    /**
     * 接收人ID
     */
    @TableField(value = "recipient_id")
    @Schema(description = "接收人ID")
    private Long recipientId;

    /**
     * 通知标题
     */
    @TableField(value = "title")
    @Schema(description = "通知标题")
    private String title;

    /**
     * 通知内容
     */
    @TableField(value = "content")
    @Schema(description = "通知内容")
    private String content;

    /**
     * 关联业务类型
     */
    @TableField(value = "related_type")
    @Schema(description = "关联业务类型")
    private String relatedType;

    /**
     * 关联业务ID
     */
    @TableField(value = "related_id")
    @Schema(description = "关联业务ID")
    private Long relatedId;

    /**
     * 是否已读(0:未读, 1:已读)
     */
    @TableField(value = "is_read")
    @Schema(description = "是否已读(0:未读, 1:已读)")
    private Integer isRead;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
